#include <iostream>
#include <string>
#include <memory>
#include "SelectServer.hpp"
using namespace std;

const int defaultbacklog = 32;

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        cout << argv[0] << " port" << endl;
        return 1;
    }
    uint16_t port = stoi(argv[1]);

    unique_ptr<SelectServer> svr = make_unique<SelectServer>(port);
    svr->Init(defaultbacklog);
    svr->Loop();

    return 0;
}